package router

import (
	"database/sql"

	"gitee.com/hp-huiw/family-expense-api/internal/handler"
	"github.com/gin-gonic/gin"
)

// Sets routes for incomeExpenseDetailType resource.
func SetIncomeExpenseDetailTypeRoutes(routerGroup *gin.RouterGroup, db *sql.DB) {
	h := handler.NewIncomeExpenseDetailTypeHandler(db)

	routerGroup.GET("/query-by-account-group", h.QueryByAccountGroup)
	routerGroup.GET("/check-existing", h.CheckExisting)
	routerGroup.GET("/query-analysis-not-included-detail-types", h.QueryAnalysisNotIncludedDetailTypes)
	routerGroup.POST("/reset-order", h.ResetOrder)
	routerGroup.POST("/add", h.Add)
	routerGroup.POST("/update", h.Update)
	routerGroup.POST("/delete", h.Delete)
	routerGroup.POST("/batch-delete", h.BatchDelete)
}
